package cn.qf.first.pojo.vo;

/**
 * @author Ran
 * @since JDK 1.8
 *
 *  标准返回对象
 */

public class RespVo<T> {
    //1.状态
    private int code = CodeType.SUCCESS.getValue();
    //2.状态说明
    private String msg;
    //3.数据
    private T data;

    public enum CodeType{
        //成功，失败，未登录
        SUCCESS(200),FAil(100),UN_LOGIN(101);
        private int value;
        CodeType(int value){
            this.value = value;
        }
        public int getValue() {
            return value;
        }
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
